<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@include('layouts.common.head')
<!-- Fonts -->
    <!-- Styles -->
    <link href="{{asset('static/css/common.css')}}" rel="stylesheet" type="text/css">
    <link href="{{asset('static/css/job/home_jobs.css')}}?v=<?php echo time() ?>" rel="stylesheet" type="text/css">
</head>
<body>
<div id="app">

    @include('layouts.nav')
    @include('home.other_top_nav')
    <div class="new-se-group">
        <div class="new-se-main">
            <div class="jobstit">
                <div class="time">
                    <div class="timebg">{{date('Y-m-d',$job->refresh_time)}}</div>
                    <div id="J_jobs_click" class="timebg viewbg">{{$job->click}}次</div>
                    <div class="clear"></div>
                </div>
                <div class="jobname">
                    <div class="j-n-txt">{{$job->jobs_name}}</div>

                    <div class="j-n-money">

                    </div>

                    <div class="clear"></div>
                </div>
                <div class="wage">
                    @if($job->negotiale == 0)
                        面议
                    @else
                        {{$job->min_wage}}-{{$job->max_wage}}元/月
                    @endif
                </div>


                @if(!empty($job->tag_cn))
                    <?php $tags = explode('+', $job->tag_cn) ?>
                    <div class="lab">
                        @foreach($tags as $tag)
                            <div class="li">{{$tag}}</div>

                        @endforeach
                        <div class="clear"></div>
                    </div>
                @endif



                {{--<div class="invalid_icon"></div>--}}

            </div>
        </div>
    </div>
    <div class="jobsshow">
        <div class="l">
            <div class="main">
                <div class="item">
                    <div class="tit">基本信息</div>
                    <div class="itemli"><span>职位类别</span>{{$job->category_cn}}</div>
                    <div class="itemli"><span>招聘人数</span>{{$job->amount?$job->amount:'保密'}}</div>
                    <div class="add"><span>工作地点</span>杭州</div>
                    <div class="clear"></div>
                    {{--<div class="itemli"><span>工作性质</span>工作性质</div>--}}
                    {{--<div class="itemli"><span>学历要求</span>学历要求</div>--}}
                    {{--<div class="itemli"><span>工作经验</span>工作经验</div>--}}

                    {{--<div class="itemli"><span>性别要求</span>性别要求</div>--}}
                    <div class="clear"></div>
                    {{--<div class="itemli"><span>年龄要求</span>年龄要求</div>--}}
                    {{--<div class="itemli"><span>招聘部门</span>--}}
                    {{--不限--}}
                    {{--</div>--}}
                    <div class="clear"></div>
                    {{--<div class="add"><span>工作地点</span>杭州</div>--}}
                    <div class="clear"></div>
                </div>
                <div class="contact">
                    <div class="tit">联系方式</div>


                    <div class="txt">
                        @if($company->contact_show == 0)
                            联系人： 企业设置不公开
                        @else
                            {{$company->contact}}&nbsp;&nbsp;(&nbsp;<span style="font-size: 13px;color: #999999;">联系我时，请说是在519人才网上看到的</span>
                            &nbsp;)
                        @endif
                    </div>

                    <div class="clear"></div>
                    @if($company->telephone_show == 0)
                        <div class="txt">联系电话：企业设置不公开</div>
                        <div class="clear"></div>
                    @else
                        <div class="txt">联系电话：<span
                                    class="tel">{{substr_replace($company->telephone,'****',3,4)}}</span>
                        </div>
                        <div class="appbtn J_check_truenum" data-content="{{$company->telephone}}">点击查看</div>
                        <div class="clear"></div>
                    @endif
                    <div class="teltip">
                        <div class="arrows"></div>
                        打电话前先投递一份简历，面试成功率提高30%
                    </div>

                    <div class="statistics">
                        <div class="sttit">职位动态</div>
                        <div class="stli">
                            <?php $num1 = str_split($company->id);$number1 = $num1[count($num1) - 1];?>
                            <div class="slitit">{{90+$number1}}%</div>
                            <div class="slitxthelp">
                                <div class="tip">
                                    <div class="arrows"></div>
                                    近两周该职位的简历处理率
                                </div>
                                简历处理率
                            </div>
                        </div>
                        <div class="stli">
                            <div class="slitit">3天</div>
                            <div class="slitxt">简历平均处理时长</div>
                        </div>
                        <div class="stli last">
                            <div class="slitit">{{date("Y-m-d",$job->refresh_time)}}</div>
                            <div class="slitxt">企业最近刷新时间</div>
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="describe">
                    <div class="tit">职位描述</div>
                    <div class="txt">
                        <pre>{{$job->contents}}</pre>
                    </div>
                    <div class="qrcode">


                        @if(!isSet($member->type))
                            <div class="resempty">你目前还没有登录：
                                <div class="resadd J_resadd" onclick="window.location.href='{{url("auth/login")}}';">
                                    立即登录
                                </div>
                            </div>
                        @elseif($member->type==2)
                            <div class="res link_blue">
                                你已有可投递的在线简历：<strong></strong>
                                <br/>
                                简历更新于{{date('Y年m月d日',$resume->refresh_time)}}<span>&nbsp;</span>
                                <a target="_blank"
                                   href="{{url('member')}}">预览</a><span>&nbsp;</span>|<span>&nbsp;</span>
                                <a href="{{url('member')}}">修改</a>
                            </div>
                        @elseif($member->type == 1)
                            <div class="resempty">您的账户为企业账户
                            </div>

                        @endif

                        <div class="clear"></div>

                    </div>

                    <div class="appjob">
                        @if(isSet($member->type) && $member->type == 2 && $isMailing == false)
                            <div class="appbtn apply_jobs" data-job="{{$job->id}}">申请职位</div>
                        @elseif($isMailing == true)
                            <div class="appbtn btn_disabled">申请职位</div>
                            您已经申请过该职位。
                        @else
                            {{--<div class="appbtn apply_allowance">申请职位</div>--}}
                            <div class="appbtn btn_disabled">申请职位</div>
                            该职位是无效职位,或者当前登录状态错误。
                        @endif
                    </div>

                    <input type="hidden" id="isMember" value="<?php echo isSet($member->id) ? $member->id : 0 ?>">
                    {{--<if condition="$jobs_info['tmp'] neq 1">--}}
                    {{--<div class="favorite bdsharebuttonbox" data-tag="share_1">--}}
                    {{--<div class="fli f1 favor">收藏</div>--}}
                    {{--<a class="fli f2 bds_more" data-cmd="more">分享</a>--}}
                    {{--<div class="fli f3 report">举报</div>--}}
                    {{--<div class="clear"></div>--}}
                    {{--</div>--}}
                    {{--</if>--}}
                </div>
            </div>


            <div class="comjobs">
                <div class="tit">
                    <div class="t">相似推荐</div>
                    <div class="more link_gray6"><a target="_blank" href="{{url('/job')}}">查看更多相似职位>></a>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="listbox">
                    @foreach($similar as $item)
                        <div class="list jump_link" data-content="{{url('job/info',[$item->id])}}"
                             style="cursor: pointer">
                            <div class="jobname link_blue">
                                <p target="_blank" href="" title="">{{$item->jobs_name}}</p>
                            </div>
                            <div class="wage">@if($job->negotiale == 0)面议@else{{$job->min_wage}}-{{$job->max_wage}}
                                元/月@endif</div>
                            <div class="txt">
                                <div class="line_substring" title=""></div>
                                {{$job->district_cn}}<span> </span>招聘人数：{{$job->amount?$job->amount."人":'保密'}}
                            </div>
                            <div class="txt link_gray6 substring">
                                <a target="_blank" href="" title=""></a>
                            </div>
                        </div>
                    @endforeach

                    <div class="clear"></div>
                </div>
            </div>
        </div>
        <div class="r">
            <div class="cominfo link_gray6">
                <div class="comname">
                    <a class="line_substring" target="_blank" href="" title="">{{$company->name}}</a>
                    <div class="clear"></div>
                </div>
                <div class="info"><span>性质</span>{{$company->nature_cn}}</div>
                <div class="info"><span>行业</span>{{$company->trade_cn}}</div>
                <div class="info"><span>规模</span>{{$company->scale_cn}}</div>
                <div class="info"><span>地区</span>{{$company->district_cn}}</div>
            </div>


        </div>
        <div class="clear"></div>
    </div>
</div>
@include('layouts.register')
@include('layouts.common.foot')
<script>
    $('.apply_jobs').click(function () {
        var id = $(this).data('job');
        //申请职位 对登陆状态进行验证
        $.ajax({
            url: '{{url('job/apply')}}',
            type: 'post',
            dataType: 'json',
            data: {id: id},
            success: function (r) {
                if (r.status === 1) {
                    disapperTooltip('remind', "申请成功");
                    setTimeout(function () {
                        window.location.reload();
                    }, 1000)

                } else if (r.status === -1) {
                    disapperTooltip('remind', r.msg);
                }
            }
        });
    });
    $('.J_check_truenum').click(function () {

        var content = $(this).data('content');

        var isMember = $('#isMember').val();

        if (isMember != '0') {
            $('.tel').text(content)
        } else {
            alert('只有登录后才能获取电话信息');
        }

    })
    $('.jump_link').click(function () {
        var url = $(this).data('content');
        window.location.href = url;
    })
</script>
</body>
</html>
